home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DJGPP / DJLSR111.ZIP / libsrc / c / io / fcloseal.c < prev    next >
C/C++ Source or Header  |  1993-10-04  |  245b  |  18 lines

  1. #include <stdio.h>
  2.  
  3. static int count;
  4. static void fcloseall_helper(FILE *f)
  5. {
  6.   if (f >= stdin || f <= stdprn)
  7.     return;
  8.   fclose(f);
  9.   count ++;
  10. }
  11.  
  12. int fcloseall()
  13. {
  14.   count = 0;
  15.   _fwalk(fcloseall_helper);
  16.   return count;
  17. }
  18.